(function () {
    const oEchart = echarts.init(document.getElementById('line03'));
    oEchart.setOption({
        title: {
            text: '堆叠折线图',
            left: 'center'
        },
        tooltip: {
            show: true
        },
        xAxis: {
            type: 'category',
            data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
        },
        yAxis: {
            type: 'value'
        },
        series: [
            {
                data: [820, 932, 901, 934, 1290, 1330, 1320],
                type: 'line',
                name: '数量1',
                stack: 'a', //堆叠标识，如果两个series item的stack值相同，则第二个图就会在第一个图的基础上进行y轴的累加
                areaStyle: {}
            },
            {
                data: [1220, 1232, 1201, 1234, 1290, 1330, 1320],
                type: 'line',
                name: '数量2',
                stack: 'a', //堆叠标识
                areaStyle: {}
            }
        ]
    })
})()